#!/usr/bin/perl

use lib::abs qw( .. ../../base_lib );
use JIP::ToolSet;

use English qw( -no_match_vars );
use Test::More tests => 5;

BEGIN { use_ok( 'Net::SMB::NameResolver', qw( getNBN ) ); }
require_ok('Net::SMB::NameResolver');

try {
    getNBN();
}
catch {
    like(
        $ARG,
        qr/^required parameter not defined at/,
        'getNBN() without require parameters'
    );
};

try {
    getNBN( ip_address => 'broken address' );
}
catch {
    like(
        $ARG,
        qr/^IP address 'broken address' must be provided in 000\.000\.000\.000 format/,
        'unexpected value in getNBN()'
    );
};

is( getNBN( ip_address => '10.0.14.140' ), undef, 'returned undef' );
